﻿using System.Configuration;

namespace MeiWinForms.comm.config;

// 该类在ConfigurationManager中使用反射实例化，此处禁用类未实例化告警
// ReSharper disable once ClassNeverInstantiated.Global
public class ConnectSection : ConfigurationSection
{
    [ConfigurationProperty(nameof(Host), IsRequired = true)]
    public string Host => (string)this[nameof(Host)];

    [ConfigurationProperty(nameof(Port), IsRequired = true)]
    public int Port => (int)this[nameof(Port)];

    [ConfigurationProperty(nameof(AsyncPort), IsRequired = true)]
    public int AsyncPort => (int)this[nameof(AsyncPort)];
}